home *** CD-ROM | disk | FTP | other *** search
- Path: interramp.com!usenet
- From: us011245@interramp.com
- Newsgroups: comp.lang.c++
- Subject: Re: HELP! Compile Error!
- Date: Tue, 05 Mar 96 14:16:07 PDT
- Organization: PSI Public Usenet Link
- Message-ID: <NEWTNews.12980.826064244.hampton@interramp.com>
- References: <4hi7vc$ggd@newsbf02.news.aol.com>
- NNTP-Posting-Host: ip185.herndon7.va.interramp.com
- Mime-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- X-Newsreader: NEWTNews & Chameleon -- TCP/IP for MS Windows from NetManage
-
-
- In article <4hi7vc$ggd@newsbf02.news.aol.com>, <mrbig0233@aol.com> writes:
- > I am an 11-year-old (yes, no typo) programmer, and I am trying to write a
- > sorting program for a merit badge. I compile the program, and the error
- > is:
- >
- > SORT.CPP 7: Declaration terminated incorrectly
- >
- > This is the code:
- >
- > #include<conio.h>
- > #include<stdio.h>
- > #include<stdlib.h>
- > #include<time.h>
- > #include<string.h>
- >
- > {
- >
- > main()
- > randomize(num1);
- > randomize(num2);
- > randomize(num3);
- > randomize(num4);
- > randomize(num5);
- > if (strcmp(num1==<num2))
- > {
- > strcpy(num2,num1);
- > }
- > if (strcmp(num2==<num3))
- > {
- > strcpy(num3,num2);
- > }
- > if (strcmp(num3==<num4))
- > {
- > strcpy(num4,num3);
- > }
- > if (strcmp(num4==<num5))
- > {
- > strcpy(num5,num4);
- > }
- > printf("The numbers, in some order:\n");
- > printf("%d, %d, %d, %d, %d",num1,num2,num3,num4,num5);
- > return;
- > }
- >
- > Please reply to this message! I NEED AN ANSWER!
- > Please, in your answer, also tell me how to fix it.
- >
- > E-Mail:
- >
- > MrBig0233@aol.com
- >
-
- MrBig,
- Your calls to strcmp look a little strange, why don't you start there.
- Luther Hampton
-
-